package cn.mw.cmdb.timetask.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author gengjb
 * @description 定时任务实体
 * @date 2024/11/4 11:48
 */
@Getter
@Setter
@Schema(name = "MwTimeTaskTypeDto", description = "定时任务信息")
public class MwTimeTaskDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "任务ID")
    private Long id;

    @Schema(description = "任务名称")
    private String jobName;

    @Schema(description = "任务描述")
    private String jobDescription;

    @Schema(description = "任务参数")
    private String jobParams;

    @Schema(description = "表达式类型")
    private Integer timeExpressionType;

    @Schema(description = "表达式")
    private String timeExpression;

    @Schema(description = "执行类型")
    private Integer executeType;

    @Schema(description = "执行器类型")
    private Integer processorType;

    @Schema(description = "执行器信息")
    private String processorInfo;

    @Schema(description = "最大同时运行任务数")
    private Integer maxInstanceNum;

    @Schema(description = "并发度，同时执行某个任务的最大线程数量")
    private Integer concurrency;

    @Schema(description = "任务整体超时时间")
    private Long instanceTimeLimit;

    private Integer instanceRetryNum;

    private Integer taskRetryNum;

    @Schema(description = "1 正常运行，2 停止（不再调度）")
    private Integer status;

    @Schema(description = "下一次调度时间")
    private Long nextTriggerTime;

    @Schema(description = "生命周期开始")
    private Long lifeCycleStart;

    @Schema(description = "生命周期结束")
    private Long lifeCycleEnd;

    @Schema(description = "任务分组")
    private String taskGroupId;

    @Schema(description = "运行是配置")
    private String dispatchStrategy;
}
